<%= will_filter_scripts_tag %>

<%= form_tag("", :id => "tr8n_form") do %>
  <%=hidden_field_tag(:type, :comment) %>
  <%= will_filter_table_tag(@results, :columns => [
    [:icn, image_tag("tr8n/icons/comment.png"), :title => "", :style => "width:12px;"],
    [:checkbox, :ids],    
    [:language_id, lambda{|comment|
      if comment.language
        link_to(comment.language.english_name, :controller => "/tr8n/admin/language", :action => :view, :lang_id => comment.language.id)
      else
         "Deleted Language"    
      end  
    }], 
    [:translator_id, lambda{|comment|
      if comment.translator
        link_to(comment.translator.name, :controller => "/tr8n/admin/translator", :action => :view, :translator_id => comment.translator.id) 
      else
         "Deleted Translator"    
      end  
    }], 
    [:message, lambda{|comment|
      comment.toHTML
    }], :created_at,
    [:actions, lambda{|comment|
      tr8n_actions_tag([
        link_to_function("Delete", "deleteObjects('#{comment.id}')")
      ])
    }, 'padding:5px;text-align:right;white-space:nowrap;']
  ]) %>
<% end %>

<%= will_filter_actions_bar_tag(@results, [
  ['Delete Selected Comments', 'deleteObjects()'] 
]) %>
